chore(test): support cross-platform test environment setup#9579
Closed
mlwelles wants to merge 2 commits intodgraph-io:mainfrom
Closed
chore(test): support cross-platform test environment setup#9579mlwelles wants to merge 2 commits intodgraph-io:mainfrom
mlwelles wants to merge 2 commits intodgraph-io:mainfrom
Conversation
Add GOPATH_LINUX_BIN to separate Linux binary paths from native binaries on non-Linux hosts (e.g., macOS). On Linux, GOPATH_LINUX_BIN defaults to $GOPATH/bin; on other platforms it defaults to $GOPATH/linux_$GOARCH. - Update all docker-compose.yml volume mounts to use GOPATH_LINUX_BIN - Add auto-build of dgraph binary when missing (make install + t.go) - Cross-compile Linux binary on non-Linux hosts during make install - Modularize t/Makefile dependency checks into individual scripts
Add jq to the pre-flight dependency checks since check-docker.sh relies on it for parsing docker info JSON output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GOPATH_LINUX_BINenvironment variable to separate Linux binary paths from native binaries on non-Linux hosts (e.g., macOS), defaulting to$GOPATH/binon Linux and$GOPATH/linux_$GOARCHelsewheredgraph/,systest/, andt/to use${GOPATH_LINUX_BIN:-$GOPATH/bin}for the/gobinbind mountmake test(via newdgraph-installedtarget) andt.go(ensureDgraphLinuxBinary)make installt/Makefiledependency checks into individual shell scripts undert/scripts/Test plan
make installon Linux and verify dgraph binary is installed to$GOPATH/binmake installon macOS and verify both native and Linux binaries are builtmake testand confirm auto-build triggers when binary is missingmake -C t checkpasses on both Linux and macOSt/scripts/check-go.sh,t/scripts/check-docker.sh) and verify output